import Blockly from 'blockly/core'
import 'blockly/python_compressed'
import 'blockly/blockly_compressed'
import 'blockly/blocks_compressed'

Blockly.Blocks.arg_keyword = {
  init: function () {
    this.appendDummyInput().appendField(
      new Blockly.FieldTextInput('arg'),
      'ARG'
    )
    this.setInputsInline(false)
    this.setOutput(true, null)
    this.setColour(210)
    this.setTooltip('lambda插件')
    this.setHelpUrl('')
  }
}

Blockly.Python.arg_keyword = function (block) {
  const code = block.getFieldValue('ARG')
  return [code, Blockly.Python.ORDER_NONE]
}

export default Blockly
